﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Tssipl.PaymentAdapter.Core;
using Tssipl.PaymentAdapter.MessageFormat.Sfms;
namespace Tssipl.PaymentAdapter.MessageEntity.Sfms.Rtgs
{
    public class RtgsOwnAccountTransferResponse :SfmsMessageEntityBase
    {
        public string TRN { get; set; }//16x //M

        public string SettledIndicator { get; set; }//1!x //M
        public string ReasonCode { get; set; }//3!x //M
        public string SettlementTime { get; set; }//6!n 

        public RtgsOwnAccountTransferResponse(MessageParseResults results)
            : base(results)
        {
            SfmsMessage message = (SfmsMessage)results.getMessage();
            SfmsBlock4 block4 = message.getBlock4();
            this.TRN = block4.getField("2020").Trim();
            this.SettledIndicator = block4.getField("6450");
            this.ReasonCode = block4.getField("6346");
            this.SettlementTime = block4.getField("3525");
        }
    }
}
